package com.shortlink.server.handler;

import com.alibaba.csp.sentinel.slots.block.BlockException;
import com.shortlink.common.base.Result;
import com.shortlink.server.dto.shortlinkmapper.ShortLinkMapperInsertReqDTO;

/**
 * 自定义流控策略
 *
 * @author wp
 */
public class CustomBlockHandler {
    public static Result<ShortLinkMapperInsertReqDTO> createShortLinkBlockHandlerMethod(ShortLinkMapperInsertReqDTO requestParam, BlockException exception) {
        return new Result<ShortLinkMapperInsertReqDTO>().setCode("B100000").setMessage("当前访问网站人数过多，请稍后再试...");
    }
}
